package com.example.demo.common.response;

import lombok.Data;

/**
 * 公共响应基础对象
 * @author farben
 */
@Data
public class SSPResponse {

    private Integer code;

    private String message;

    public SSPResponse() {}

    public SSPResponse(Integer code) {
        this.code = code;
    }

    public SSPResponse(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static SSPResponse success(){
        return new SSPResponse(ResponseCodeEnum.OK.code);
    }

    public static SSPResponse failed(){return new SSPResponse(ResponseCodeEnum.ERROR.code);}
}
